cmake_minimum_required(VERSION 3.10)

project(Cpp17FuncTests)

file(GLOB_RECURSE HEADERS_FOR_IDE
    ${CMAKE_SOURCE_DIR}/include/*)

add_library(TestFuncs SHARED
    ${HEADERS_FOR_IDE}
    ${CMAKE_SOURCE_DIR}/src/Common.cpp
    ${CMAKE_SOURCE_DIR}/src/FileSystem.cpp
    ${CMAKE_SOURCE_DIR}/src/FoldExpression.cpp
    ${CMAKE_SOURCE_DIR}/src/If.cpp
    ${CMAKE_SOURCE_DIR}/src/InlineVariable.cpp
)
target_include_directories(
    TestFuncs PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_compile_features(TestFuncs PUBLIC cxx_std_17)

add_executable(DoTests ${CMAKE_SOURCE_DIR}/samples/main.cpp)
target_link_libraries(DoTests PRIVATE TestFuncs)
